import Vue from 'vue'
import vuex from 'vuex'
import helloWorldState from './helloWorldStore'
Vue.use(vuex)
export default new vuex.Store({
  state: {
    show: false,
    helloWorldState: helloWorldState
  },
  mutations: {
    addClicked (state, index) {
      helloWorldState.clicked = helloWorldState.yourName[index].pk
      console.log(this.state)
      console.log(helloWorldState)
    }
  },
  actions: {
    addClicked (context, index) {
      context.commit('addClicked', index)
    }
  }
})
